﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BounceBackProjectSpawn : MonoBehaviour
{
    public GameObject project;
    public GameObject level2act;

    private float timeStamp;
    private float inteval = 0.5f;

    public void Spawn(Transform transform)
    {
        if (Time.time >= timeStamp + inteval)
        {
            GameObject.Instantiate(level2act, transform.position, Quaternion.Euler(Vector3.right));

            GameObject __project = GameObject.Instantiate(project, transform.position, Quaternion.Euler(Vector3.right));
            __project.GetComponent<PlayerTwoProject>().InitProject(FaceDir.FACE_DIR_LEFT);
            timeStamp = Time.time;
        }

    }

}
